package com.fan.admin.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @author fan
 * @date 2021/1/25
 */
@Controller
public class PageController {


	@GetMapping("/")
	public String index() {
		return "index";
	}

	@GetMapping("/login")
	public String login() {
		return "login";
	}


	@GetMapping("/admin")
	public String adminIndex() {
		return "adminIndex";
	}


	@GetMapping("/manage")
	public String toManage() {
		// 管理系统
		return "studentIndex";
	}

	@GetMapping("/teacher")
	public String teacher() {
		return "teacherIndex";
	}

	@GetMapping("pages/{moduleName}")
	public String toPage(@PathVariable String moduleName) {
		String view = "pages/" + moduleName;
		return view;
	}


	@GetMapping("pages/course/{moduleName}")
	public String toCoursePage(@PathVariable String moduleName) {
		String view = "pages/course/" + moduleName;
		return view;
	}

	@GetMapping("pages/student/{moduleName}")
	public String toStudentPage(@PathVariable String moduleName) {
		String view = "pages/student/" + moduleName;
		return view;
	}

	@GetMapping("pages/teacher/{moduleName}")
	public String toTeacherPage(@PathVariable String moduleName) {
		String view = "pages/teacher/" + moduleName;
		return view;
	}


}
